package ace.oauth2.provider.common.converter;

import ace.oauth2.provider.common.properties.OAuth2ClientProperty;
import ace.oauth2.provider.common.support.DefaultClientDetails;
import org.mapstruct.Mapper;
import org.springframework.security.oauth2.provider.client.BaseClientDetails;

/**
 * @author Caspar
 * @contract 279397942@qq.com
 * @create 2020/10/20
 * @description {@link org.springframework.security.oauth2.provider.ClientDetails} converter
 */
@Mapper(componentModel = "spring")
public interface ClientDetailsConverter {
    BaseClientDetails toBaseClientDetailsFrom(OAuth2ClientProperty oAuth2ClientProperty);

    DefaultClientDetails toDefaultClientDetailsFrom(OAuth2ClientProperty oAuth2ClientProperty);
}
